package com.threeti.jiayusms.domain.service.communicationrule;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.threeti.jiayusms.domain.model.CommunicationRule;
import com.threeti.jiayusms.infrastructure.communicationrule.CommunicationRuleDao;

@Service
@Transactional
public class CommunicationRuleUpdateServiceImpl implements CommunicationRuleUpdateService {
	@Autowired
	private CommunicationRuleDao dao;

	@Override
	public CommunicationRule storeCommunicationRule(CommunicationRule communicationRule) {
		return dao.store(communicationRule);
	}

	@Override
	public void removeCommunicationRuleBy(Long ruleTemplateId) {
		dao.removeBy(ruleTemplateId);
	}
}
